<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>layuiAdmin 管理员 iframe 框</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" th:href="@{/layuiadmin/layui/css/layui.css}" media="all">
	<link rel="stylesheet" th:href="@{/layuiadmin/style/admin.css}" media="all">
</head>
	
<body>
<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin">
	<input type="hidden" th:value="${zx_data.id }" name="id" />
	<input type="hidden" value="" name="tids" id="tids" />
	<table cellpadding="6" border="0" class="layui-table" widht="100%" style="margin-top: 0">
		<tr>
			<th width="100">当前用户</th>
			<td>[[${zx_data.tname}]]</td>
		</tr>
		<tr>
			<th>可管理人</th>
			<td>
				<div class="branch_list" th:each="branch:${branchUserList}">
					<div>[[${branch.levelName }]]</div>
					<div  th:each="user:${branch.userList}">
						<input type="checkbox" lay-skin="primary" name="tid_checkbox" th:checked="${#strings.contains(role_uid_str,user.id)}" th:value="${user.id}" th:text="${user.tname}">
					</div>
				</div>
			</c:forEach>
			</td>
		</tr>
	</table>
	
	<div class="layui-form-item layui-hide">
		<input type="button" lay-submit lay-filter="ZX_iframe_submit" id="ZX_iframe_submit" value="确认">
	</div>
</div>

<script th:src="@{/layuiadmin/layui/layui.js}"></script>
<script>
layui.config({
	base: '../layuiadmin/' //静态资源所在路径
}).extend({
	index: 'lib/index' //主入口模块
}).use(['index', 'form'], function(){
	var $ = layui.$,
	form = layui.form;
	$("#ZX_iframe_submit").click(function(){
		var tid_str="";
		$("#tids").val("");
		$("input:checkbox[name='tid_checkbox']:checked").each(function() {
		    tid_str +=  $(this).val() +',';
		});
		$("#tids").val(tid_str);
	})
})
</script>
</body>
</html>